package org.linuxgears.BouncingBall.painter;

import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: khilkeol
 * Date: 2 ��� 2010
 * Time: 12:59:57
 * To change this template use File | Settings | File Templates.
 */
public class SimpleBallPainter {
    private Color color;
    private int size;
    private Point position;

    public SimpleBallPainter(Color color, int radius, Point position) {
        this.color = color;
        this.size = radius;
        this.position = position;
    }

    public void paint(Graphics g) {
        ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        
        g.setColor(color);
        g.fillOval(position.x, position.y, size, size);
    }

    public Color getColor() {
        return color;
    }

    public int getSize() {
        return size;
    }

    public Point getPosition() {
        return position;
    }
}
